package com.xiaojianone.product.service;
import java.math.BigDecimal;
import java.util.concurrent.TimeUnit;

import com.xiaojianone.product.bean.Product;
import org.springframework.stereotype.Service;

/**
 * ClassName  ProductService
 * Author  XiaojianOne
 * Date  2025/3/10 10:33
 * Version  8.0
 */

@Service
public class ProductService {


    public Product getProductById(Long productId) {

        Product product = new Product();
        product.setId(productId);
        product.setPrice(new BigDecimal("99"));
        product.setProductName("Apple"+productId);
        product.setNum(2);

       /* try {
            TimeUnit.SECONDS.sleep(100);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }*/

        return product;
    }
}
